import Vue from 'vue'
import Vuex from 'vuex'

Vue.use(Vuex)

export default new Vuex.Store({
  state: {
    token: '',
    activeNavPath: ''
  },
  mutations: {
    setToken(state, e) {
      state.token = e.data.token
    },
    removeToken(state) {
      state.token = ''
    },
    saveActivePath(state, e) {
      state.activeNavPath = e
    },
    removeActivePath(state) {
      state.activeNavPath = ''
    }
  },
  actions: {

  }
})
